<template>
  学生活动测试 这里应该显示数据啊
  <div v-for="(item, index) in list" :key="index">
    {{ item.studentName }}
  </div>
</template>
<script setup>
import { getStudentNameAndId } from "@/api/wlxz/activity";
import { ref } from "vue";

const query = {
  activityId: 30,
};
const list = ref([]);
const get = () => {
  const res = getStudentNameAndId(query).then(() => {
    list.value = res.rows;
    console.log(res);
  });
};
onMounted(() => {
  get();
  console.log(list);
});
</script>
